<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>后盾人</title>
  </head>
  <body>
    <div>houdunren.com</div>
  </body>
  <script>
    const div = document.querySelector("div");
    [...div.textContent].reduce(function(pre, cur, index) {
      pre == index && (div.innerHTML = "");
      let span = document.createElement("span");
      span.innerHTML = cur;
      div.appendChild(span);
      span.addEventListener("mouseover", function() {
        this.classList.add("color");
      });
    }, 0);
  </script>
</html>
